<template>
  <div id="app">
    
    <button @click="showSuccess">成功就弹</button>
    <button @click="showConfirm">显示确认框</button>
    <button @click="showNotic">显示通知</button>
  </div>
</template>

<script>


export default {
  name: 'App',
  mounted(){
    this.$message("弹出框框")
  },

  data:
    function  (){
      return {
        
      }
    }
  ,
  methods:{
    showSuccess:function(){
      this.$message({
        type:"success",
        message:"成功的提示框"
      })
    },
    showConfirm:function(){
      this.$confirm("不要点取消！","确认",{})
      .then(res=>{
        this.$message({
          message:"确认了",
          type:"success"
        })
      }).catch(err=>{
        this.$message({
          type:"warning",
          message:"还是点了"
        })
      })
    },
    showNotic:function(){
      this.$notify({
        title:"通知框",
        message:"点了通知",
        type:"success",
        duration:5000 //ms
      })
    }
  },
  components: {
    
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
